This invention relates in general to the field of image compression and decompression, and more particularly to a computationally efficient method of decompressing signals that were compressed by using Differential Pulse Code Modulation (DPCM).
Differential Pulse Code Modulation is a compression algorithm commonly used in image compression applications. In DPCM, the compressed code words do not represent the actual sample values (as they do in Pulse Code Modulation, or PCM), but the difference between samples. As an example, if we digitize a line of pixels in an image using DPCM, a code word may represent the difference in brightness between the current pixel and it""s left neighbor. Since the difference between adjoining images is usually small, the code words that represent small differences occur much more frequently than others. These code words can be made very small, resulting in a high compression rate.
DPCM is a simple example of predictive coding methods, since we attempt to predict the value of a sample using one or more neighboring samples. If the prediction is correct, the result is a very compact code word. The value used to predict the next sample is called the predictor. The predictor for a given sample may be an immediate neighbor, or it may be mathematically derived from more than one neighbor. As an example, the JPEG still picture compression standard uses the following choice of predictors:
No Prediction (PCM)
A
B
C
A+Bxe2x88x92C
A+(Bxe2x88x92C)/2
B+(Axe2x88x92C)/2
(A+B)/2
where A, B and C are located in the image as follows:
B C
A X
and where X is the pixel being predicted. Selection of the best predictor depends on the data being encoded. In the case of simple image encoding the left neighbor pixel may be used with good results.
Differential Pulse Code Modulation may be used in either a lossless or a lossy mode. In the more common lossy mode, the difference values are quantized by division with a constant followed by truncation. This will result in a shorter code word, but at the expense of image quality.
The compression and decompression steps used in DPCM tend to be computationally intensive. When operating in a real-time environment where each image must be decoded in a given time defined by the display or printer requirements, this can present a problem. It is the intent of this invention to show a novel method of decompressing DPCM coded images in real time with a reduced computational requirement.
The present invention comprises a data processing system designed to compress and decompress data using Differential Pulse Code Modulation. The data to be compressed is coded in two parts, where the first part is the difference magnitude categorized into intervals that may be linear or logarithmic, and Variable Length Codes (VLC) are transmitted for the category with additional bits sent to define the actual value. The method employed for decoding uses the left most bit detection capability of the Texas Instruments TMS320C8X Digital Signal Processor in the preferred embodiment, and Look Up Tables (LUT) are then used to decode the category and the additional difference bits in one step instead of the multiple step decoding process normally used in the art.